package Week.Week315;

import java.util.HashSet;

public class p2 {
    class Solution {
        public int countDistinctIntegers(int[] nums) {
            HashSet<Integer> set = new HashSet<>();
            for (int num : nums) {
                set.add(num);
                int t = num;
                int a = 0;
                while (t > 0) {
                    a *= 10;
                    a += t % 10;
                    t = t / 10;
                }
                set.add(a);
            }
            return set.size();
        }
    }
}
